#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

long long memo[25][25][25];

long long w(long long a,long long b,long long c){
	if(a<=0||b<=0||c<=0)             return 1;
	else if (memo[a][b][c]!=-1)		 return memo[a][b][c];
	else if(a>20||b>20||c>20)	 memo[a][b][c]=w(20,20,20);
	else if(a<b&&b<c)			 memo[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c);
	else 						 memo[a][b][c]=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1);
    return memo[a][b][c];
}

int main(){
	long long a,b,c;
	long long a1,b1,c1;
	while(scanf("%lld%lld%lld", &a, &b, &c)){
		memset(memo,-1,sizeof(memo));
		if(a==-1&&b==-1&&c==-1)		break;
		a1=a;	b1=b;	c1=c;
		if(a>20)	a1=21;
		if(b>20)    b1=21;
		if(c>20)	c1=21;
		if(a<0)		a1=-1;
		if(b<0)     b1=-1;
		if(c<0)		c1=-1;
		cout<<"w("<<a<<","<<" "<<b<<","<<" "<<c<<")"<<" "<<"="<<" "<<w(a1,b1,c1)<<endl;
	}
	return 0;
}